package com.halachawiki.client.login;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.halachawiki.client.login.LoginService.Status;
import com.halachawiki.shared.PublicUserInfo;

public interface LoginServiceAsync {

	void userExists(String email, AsyncCallback<Status> callback);

	void logInUser(String email, String password, boolean rememberMe,
			AsyncCallback<Status> callback);

	void registerNewUser(String email, String password, String displayName,
			String aboutMe, String locale, AsyncCallback<Status> callback);

	void logout(AsyncCallback<Void> callback);

	void sendPasswordReminder(String email, AsyncCallback<Status> callback);

	void getCurrentUserInfo(AsyncCallback<PublicUserInfo> callback);

	void changePassword(String oldPassword, String newPassword,
			AsyncCallback<Status> callback);

	void sendApprovalReminder(AsyncCallback<Status> callback);

	void getAllUserInfo(AsyncCallback<PublicUserInfo[]> callback);

	void approveUser(String email, AsyncCallback<Status> callback);

	void changeUserEmail(String oldEmail, String newEmail,
			AsyncCallback<Status> callback);

	void getUserInfo(String email, AsyncCallback<PublicUserInfo> callback);

	void banUser(String email, AsyncCallback<Status> callback);

	void unbanUser(String email, AsyncCallback<Status> callback);

	void confirmUserEmail(String email, AsyncCallback<Status> callback);

	void resendConfirmationEmail(AsyncCallback<Boolean> callback);

	void confirmMe(String confirmationKey, AsyncCallback<Status> callback);
}
